﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace OrderForm
{
   public partial class Loader : Form
   {
      public Loader()
      {
         InitializeComponent();
      }

      private void Loader_Load(object sender, EventArgs e)
      {
         timer1.Start();
         timer1.Interval = 200;
         progressBar1.Maximum = 10;
         timer1.Tick += new EventHandler(timer1_Tick);
      }

      private void timer1_Tick(object sender, EventArgs e)
      {
         if (progressBar1.Value != 9)
         {
            progressBar1.Value++;
            this.statusText.Text = "Starting Order Form...";
         }
         else
         {
            timer1.Stop();
            Hide();
            new MainForm().Show();
         }
      }
   }
}
